<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>我的账户</title>
    
    <link rel="shortcut icon" href="/static/favicon.ico"/>
    <link rel="stylesheet" href="/static/front/fonts/iconfont.css">
    <link rel="stylesheet" href="/static/front/css/base_new.css">
    <link rel="stylesheet" href="/static/front/css/library.css">
    <link rel="stylesheet" href="/static/front/css/style.css">
    <script src="/static/front/js/jquery-1.11.1.min.js"></script>
    <script src="/static/front/js/jquery.countdown.js"></script>
    <script src="/static/front/js/js.js"></script>
    <!--[if lt IE 9]>
    <script src="/static/front/js/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script type="text/javascript" src="plugIn/PIE.js"></script>
    <![endif]-->
    
	<style type="text/css">
       .investment .quick_screen{display:inline;}
       .investment .quick_screen:after{display:block;content:'';overflow:hidden;width:0;height:0;celar:both;}
       .investment .quick_screen span{margin-top:8px;margin-left:25px;}
       .investment .screen ul li{float:left;margin:8px 8px;}
       .investment .screen ul li a{display:inline;padding:3px 10px;}
       .investment .screen ul li a.current{background:#5dc0d2;color:#fff;}
       .investment .screen ul li a:hover{background:#5dc0d2;color:#fff;}
       
       .Tab .Tab-shuaixuan{float:right;margin-top:-40px;cursor:pointer;
      	width: 78px;
   		height: 25px;
    	border: #4db0c2 1px solid;
    	background: #5dc0d2;
    	color: #fff;
    	border-radius: 3px;
   		-webkit-border-radius: 3px;
   		-moz-border-radius: 3px;
    	-ms-border-radius: 3px;
   		text-align: center;
   		behavior: url(plugIn/PIE.htc);
    	line-height:25px;
   		}
   		
   		.investment .quick_sxtj{margin-left:20px;}
   		.investment .quick_sxtj ul.clearfix li{font-size:12px;}
   		.investment .quick_sxtj ul.clearfix li input{border:1px solid #ccc;height:25px;}
   		.investment .quick_sxtj ul.clearfix li .quick_btn{
   		width:50px;
   		height:27px;
    	border: #4db0c2 1px solid;
    	background: #5dc0d2;
    	color: #fff;
    	border-radius: 3px;
   		-webkit-border-radius: 3px;
   		-moz-border-radius: 3px;
    	-ms-border-radius: 3px;
   		text-align: center;
   		behavior: url(plugIn/PIE.htc);
    	line-height:26px;
    	cursor:pointer;margin-left:20px;
   		}
      </style>
</head>

<body>	
    <!-- 头部 开始 -->
    <div id="header">
    	<#include "../base/top.ftl" />
    </div>	
    <div class="content">
		<div id="myInvestmentMain" class="cnt clearfix layoutMain">
		   <#include "base1.ftl" />
		   <div class="investment fr" style="width:81.5%">
            <h2>资金明细</h2>
            <div class="Tab" style="margin-top: 48px;">
                <span class="TabOne tableTab active">资金记录查询</span>
                <span class='Tab-shuaixuan'>快速筛选</span>
                <div class="screen" style="border-top:1px dashed #ccc;width:100%;height:0px;overflow:hidden;">
                	<div class="quick_screen" style="width:100%;height:45px">
                		<span class='fl'>筛选时间段：</span>
                		<ul class='fl'>
						    <li id="-1"><a  class="current" href="javascript:void(0)">全部</a></li>
						    <li id="1"><a href="javascript:void(0)">今天</a></li>
						    <li id="2"><a href="javascript:void(0)">最近1周</a></li>
						    <li id="3"><a href="javascript:void(0)">最近1个月</a></li>
						    <li id="4"><a href="javascript:void(0)">最近3个月</a></li>
						    <li id="5"><a href="javascript:void(0)">最近6个月</a></li>
						</ul>
                	</div>
                	<div class='quick_sxtj'>
                		<ul class="clearfix">
                            <li>
                                <input type="text" id="publishTimeBegin1" style="line-height:25px;display:inline-block;text-align:center;" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:'readOnly'})" placeholder="请选择开始时间" value="<#if publishTimeBegin?exists>${publishTimeBegin}</#if>">&nbsp;&nbsp; 到&nbsp;&nbsp;
                                <input type="text" id="publishTimeEnd1" style="line-height:25px;display:inline-block;text-align:center;" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:'readOnly'})" placeholder="请选择结束时间" value="<#if publishTimeEnd?exists>${publishTimeEnd}</#if>">
                            </li>
                            <li>
                                <select name="momeyType" id="momeyType" style="height:27px;border: 1px solid #ccc;">
                                    <option value="-1">---选择类型---</option>
                                    <#list typeList as model>
                                    	<option value="${model.index}" <#if type?exists && type==model.index> selected="selected" </#if> >${model.name}</option>
                                    </#list>
                                </select>
                            </li>
                            <li>
                                <input type="button" class='quick_btn' value="搜 索" id="search">
                            </li>
                        </ul>
                	</div>
                </div>
              <script>
             	var h = $('.screen').height();
             	if(h==0){
             		$('.screen').css('border','none')
             	};
              	$('.Tab-shuaixuan').click(function(){
              		var h = $('.screen').height();
              		if(h==0){
              			$('.screen').css({
              				'borderTop':'1px dashed #ccc',
              			}).animate({
              				height:90
              			});
              		}else{
              			$('.screen').animate({
              				height:0
              			},function(){
              				$('.screen').css('borderTop','none');
              			});
              		};
              	});
             	<#if (publishTimeBegin?exists && publishTimeBegin != '') || (publishTimeEnd?exists && publishTimeEnd != '') || (type?exists && type != -1) || (timePeriod?exists && timePeriod != '-1')>
             		$(".Tab-shuaixuan").click();
             	</#if>
              </script>
              <#if (pageInfo??) & (pageInfo.pageList?size>0)>
		          <table class="tabLibrary receivables" border="0" cellspacing="0" cellpadding="0" style='margin-top: 0px;display:block;'>
		          	<tbody>
		            	<tr>
		                    <th class="tow" style="text-align:center;width:290px;">时间 ｜ 类型</th>
		                    <th class="two" style="text-align:center;width:290px;">收入 ｜ 支出</th>
		                    <th class="four" style="text-align:center;">冻结资金</th>
		                    <th class="four" style="text-align:center;">余额</th>
		                    <th class="five" style="text-align:center;">备注</th>
		                </tr>
		                	<#list pageInfo.pageList as model>
		                		<tr>
		                			<td class="two">
				                        <i class="fl"><#if model.createTime?exists>${model.createTime?string("yyyy-MM-dd HH:mm:ss")}</#if></i>
				                        <u class="fl">
		                                	<#list typeList as temp>
		                                		<#if model.type==temp.index>
		                                			${temp.name}
		                                		</#if>
		                                    </#list>				                        
										</u>
				                    </td>
				                    <td class="two">
				                        <i class="fl">￥<#if model.income?exists>${model.income?string('0.00')}</#if></i>
				                        <u class="fr">￥<#if model.expend?exists>${model.expend?string('0.00')}</#if></u>
				                    </td>
				                    <td class="four">
				                    	<i>￥<#if model.freezen?exists>${model.freezen?string('0.00')}</#if></i>
				                    </td>
				                    <td class="four">
				                    	<i>￥<#if model.balance?exists>${model.balance?string('0.00')}</#if></i>
				                    </td>
				                    <td class="five">
				                    	<i><#if model.remark?exists>${model.remark}</#if></i>
				                    </td>
		                		</tr>
		                	</#list>
		                </tbody>
		        	</table>
		        <div class="tcdPageCode"></div>
		    <#else>
		    	<table class="tabLibrary receivables" border="0" cellspacing="0" cellpadding="0" style='margin-top: 0px;display:block;'>
		          	<tbody>
		            	<tr>
		                    <th class="one" style="text-align:center;">时间 ｜ 类型</th>
		                    <th class="two" style="text-align:center;">收入 ｜ 支出</th>
		                    <th class="four" style="text-align:center;">冻结资金</th>
		                    <th class="four" style="text-align:center;">余额</th>
		                    <th class="five" style="text-align:center;">备注</th>
		                </tr>
                		<tr align="center">
	                    	<td colspan="10">暂无数据</td>
	                	</tr>
                	</tbody>
                </table>
  			</#if>
            </div>
        </div>
		</div>
    </div>
    <div id="footer">
      <div class="content">      
		<#include "../base/foot.ftl" />
      </div>
    </div>       
</div>
<script type="text/javascript" src="${_front_js}/jquery.page.js"></script>
<script type="text/javascript" src="${_front_js}/tabs.js"></script>
<script type="text/javascript" src="${_front_js}/date.js"></script>
<script type="text/javascript" src="${_front_js}/My97DatePicker/WdatePicker.js"></script>
<script>

$(".tcdPageCode").createPage({
    pageCount:${pageInfo.pages},//总页数
    current:${pageInfo.index},
    backFn:function(index){
        window.location.href="/account/fund?publishTimeBegin=<#if publishTimeBegin?exists>${publishTimeBegin}</#if>&publishTimeEnd=<#if publishTimeEnd?exists>${publishTimeEnd}</#if>&type=<#if type?exists>${type}</#if>&index="+index;
    }
});

<#if timePeriod?exists>
	$(".current").removeClass("current");
	$('#'+'${timePeriod}'+' a').addClass("current");
</#if>

$(".quick_screen ul li").click(function(){
	var publishTimeBegin = $("#publishTimeBegin1").val();
	var publishTimeEnd = $("#publishTimeEnd1").val();
	var type = $("#momeyType option:selected").val();
	$(".current").removeClass("current");
	$(this).addClass("current");
	var id = $(this).attr("id");
	window.location="/account/fund?timePeriod="+id+"&publishTimeBegin="+publishTimeBegin+"&publishTimeEnd="+publishTimeEnd+"&type="+type;
});

$("#search").click(function(){
	var publishTimeBegin = $("#publishTimeBegin1").val();
	var publishTimeEnd = $("#publishTimeEnd1").val();
	var type = $("#momeyType option:selected").val();
	var timePeriod = "-1";
	<#if timePeriod?exists>
		timePeriod = ${timePeriod};
	</#if>
	window.location="/account/fund?publishTimeBegin="+publishTimeBegin+"&publishTimeEnd="+publishTimeEnd+"&type="+type+"&timePeriod="+timePeriod;
})
</script>
</body>
</html>